home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir43
/
qsrc_dsk.zip
/
MODEL
/
PRODUCT
/
PRODUCT1.SPR
< prev
next >
Wrap
Text File
|
1991-12-16
|
5KB
|
152 lines
* ╓─────────────────────────────────────────────────────────╖
* ║ ║
* ║ 12/16/91 PRODUCT1.SPR 15:15:03 ║
* ║ ║
* ╟─────────────────────────────────────────────────────────╢
* ║ ║
* ║ Application Developed in _Using FoxPro 2_ ║
* ║ ║
* ║ Copyright (c) 1991 Lisa C. Slater and Steven E. Arnott ║
* ║ Que Publishing (800)-428-5331 ║
* ║ City, Zip ║
* ║ ║
* ║ Description: ║
* ║ This program was automatically generated by GENSCRN. ║
* ║ ║
* ╙─────────────────────────────────────────────────────────╜
#REGION 0
REGIONAL m.currarea, m.talkstat, m.compstat
IF SET("TALK") = "ON"
SET TALK OFF
m.talkstat = "ON"
ELSE
m.talkstat = "OFF"
ENDIF
m.compstat = SET("COMPATIBLE")
SET COMPATIBLE FOXPLUS
* ╓─────────────────────────────────────────────────────────╖
* ║ ║
* ║ Window definitions ║
* ║ ║
* ╙─────────────────────────────────────────────────────────╜
*
DEFINE WINDOW product ;
FROM INT((SROW()-7)/2),INT((SCOL()-35)/2) ;
TO INT((SROW()-7)/2)+6,INT((SCOL()-35)/2)+34 ;
TITLE " PRODUCT " ;
FLOAT ;
CLOSE ;
SHADOW ;
COLOR SCHEME 1
* ╓─────────────────────────────────────────────────────────╖
* ║ ║
* ║ PRODUCT1 Setup Code - SECTION 2 ║
* ║ ║
* ╙─────────────────────────────────────────────────────────╜
*
#REGION 1
* #REDEFINE generator directive in case
* file has been interactively BROWSEd under
* WIDGET.MPR, which would result in a window
* of the same name already existing because we
* named these windows the same as the files!
* A browse window is named by its title and
* its default title is its ALIAS.
* ╓─────────────────────────────────────────────────────────╖
* ║ ║
* ║ PRODUCT1 Screen Layout ║
* ║ ║
* ╙─────────────────────────────────────────────────────────╜
*
#REGION 1
IF WVISIBLE("product")
ACTIVATE WINDOW product SAME
ELSE
ACTIVATE WINDOW product NOSHOW
ENDIF
@ 1,1 SAY "Prodcode"
@ 1,11 GET prodcode ;
SIZE 1,5 ;
DEFAULT " " ;
PICTURE "@! AAA99" ;
VALID _q1f0wynfr() ;
ERROR IIF(EMPTY(prodcode), "Product code cannot be empty.", "Product code already in use.")
@ 3,1 SAY "Prodname"
@ 3,11 GET prodname ;
SIZE 1,20 ;
DEFAULT " "
IF NOT WVISIBLE("product")
ACTIVATE WINDOW product
ENDIF
READ CYCLE
RELEASE WINDOW product
#REGION 0
IF m.talkstat = "ON"
SET TALK ON
ENDIF
IF m.compstat = "ON"
SET COMPATIBLE ON
ENDIF
* ╓─────────────────────────────────────────────────────────╖
* ║ ║
* ║ _Q1F0WYNFR prodcode VALID ║
* ║ ║
* ║ Function Origin: ║
* ║ ║
* ║ From Screen: PRODUCT1, Record Number: 4 ║
* ║ Variable: prodcode ║
* ║ Called By: VALID Clause ║
* ║ Object Type: Field ║
* ║ Snippet Number: 1 ║
* ║ ║
* ╙─────────────────────────────────────────────────────────╜
*
FUNCTION _q1f0wynfr && prodcode VALID
#REGION 1
IF EMPTY(prodcode)
* it shouldn't be blank
RETURN .F.
ENDIF
IF RECCOUNT() = 0
* don't bother checking if
* first record
RETURN .T.
ENDIF
mcode = prodcode
mreturn = .T.
mrec = IIF(EOF(),0,RECNO())
morder = ORDER()
SET ORDER TO prodcode
IF SEEK(mcode)
IF RECNO() # mrec
mreturn = .F.
ELSE
SKIP
IF prodcode == mcode
mreturn = .F.
ENDIF
ENDIF
ENDIF
SET ORDER TO (morder)
IF mrec = 0
GO BOTTOM
SKIP
ELSE
GO mrec
ENDIF
RETURN mreturn